package com.example.sls.service.impl.field;

import com.example.sls.pojo.field.Comments;
import com.example.sls.dao.field.CommentsDao;
import com.example.sls.service.intserfaces.field.CommentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评论表(Comments)表服务实现类
 *
 * @author 蓝江富
 * @since 2024-06-18 10:55:00
 */
@Service
public class CommentsServiceImpl implements CommentsService {
  @Autowired
  CommentsDao commentsDao;

  @Override
  public Comments queryById(Integer id) {
    return commentsDao.queryById(id);
  }

  @Override
  public int deleteById(Integer id) {
    return commentsDao.deleteById(id);
  }

  @Override
  public int update(Comments comments) {
    return commentsDao.update(comments);
  }

  @Override
  public int insert(Comments comments) {
    return commentsDao.insert(comments);
  }

  @Override
  public long count() {
    return commentsDao.count();
  }

  @Override
  public List<Comments> queryAllByLimit(Comments comments, Integer pageSize, Integer offset) {
    return commentsDao.queryAllByLimit(comments, pageSize, offset);
  }
}
